<template>
  <div class="options">
    <slot></slot>
    <div class="btn">
      <i @click="goCart" class="iconfont icon-cart"></i>
      <div  class="num">{{this.$store.state.cart.length}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name:'Options',
}
</script>

<style scoped>
  .options{
    position: fixed;
    bottom:80px;
    right: 80px;
    z-index: 10;
  }
  .btn{
    width: 52px;
    height: 52px;
    background: rgb(243, 254, 252);
    border: 1px solid rgb(255, 255, 255);
    box-shadow: rgb(129 234 215) 0px 8px 20px -8px;
    color: rgb(27, 229, 192);
    margin-top: 14px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    transition: .15s ease;
    z-index: 100;
    position: relative;
  }
  .btn:hover{
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -8px #02dbb4;
  }
  .btn>i{
    font-size: 30px;
  }
  .num{
    position: absolute;
    top: 0;
    right: 4px;
    background: #1be5c0;
    font-size: 12px;
    color: #fff;
    height: 18px;
    line-height: 18px;
    border-radius: 9px;
    padding: 0 9px;
    font-weight: 700;
    transform: translateX(50%);
  }
</style>